package com.wgb.movie.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wgb.movie.model.dto.movieEvaluation.MovieEvaluationQueryRequest;
import com.wgb.movie.model.entity.MovieEvaluation;
import com.wgb.movie.model.vo.MovieEvaluationVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 评价服务
 *
 * @author <a href="https://github.com/liyupi">程序员鱼皮</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
public interface MovieEvaluationService extends IService<MovieEvaluation> {

    /**
     * 校验数据
     *
     * @param movieEvaluation
     * @param add 对创建的数据进行校验
     */
    void validMovieEvaluation(MovieEvaluation movieEvaluation, boolean add);

    /**
     * 获取查询条件
     *
     * @param movieEvaluationQueryRequest
     * @return
     */
    QueryWrapper<MovieEvaluation> getQueryWrapper(MovieEvaluationQueryRequest movieEvaluationQueryRequest);
    
    /**
     * 获取评价封装
     *
     * @param movieEvaluation
     * @param request
     * @return
     */
    MovieEvaluationVO getMovieEvaluationVO(MovieEvaluation movieEvaluation, HttpServletRequest request);

    /**
     * 分页获取评价封装
     *
     * @param movieEvaluationPage
     * @param request
     * @return
     */
    Page<MovieEvaluationVO> getMovieEvaluationVOPage(Page<MovieEvaluation> movieEvaluationPage, HttpServletRequest request);
}
